package com.dartfar.workflow.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

/**
 * 工作流事件表
 * @author 王琦
 *
 */

@Entity
@Table(name = "T_WorkflowEvents")
public class WorkflowEvents {
	
	//主键
	private int id;
	//流程定义ID
	private String processDefinitionId;
	//任务名称
	private String taskName;
	//事件类型
	private String eventType;
	//事件范围
	private String eventScope;
	//执行策略
	private String executeStrategy;
	//执行业务服务
	private String serviceId;
	//执行业务方法
	private String serviceMethod;
	//方法参数列表
	private String methodParams;
	//流程功能挂接
	private WorkflowProcessFunMount workflowProcessFunMount;
	//任务功能挂接
	private WorkflowTaskFunMount workflowTaskFunMount;
	//排序
	private int orderIndex;
	
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getTaskName() {
		return taskName;
	}
	public void setTaskName(String taskName) {
		this.taskName = taskName;
	}
	public String getEventScope() {
		return eventScope;
	}
	public void setEventScope(String eventScope) {
		this.eventScope = eventScope;
	}
	public String getExecuteStrategy() {
		return executeStrategy;
	}
	public void setExecuteStrategy(String executeStrategy) {
		this.executeStrategy = executeStrategy;
	}
	public String getServiceId() {
		return serviceId;
	}
	public void setServiceId(String serviceId) {
		this.serviceId = serviceId;
	}
	public String getServiceMethod() {
		return serviceMethod;
	}
	public void setServiceMethod(String serviceMethod) {
		this.serviceMethod = serviceMethod;
	}
	public String getMethodParams() {
		return methodParams;
	}
	public void setMethodParams(String methodParams) {
		this.methodParams = methodParams;
	}
	
	@ManyToOne(fetch = FetchType.LAZY, optional = true)
	@JoinColumn(name = "workflowProcessFunMount")
	public WorkflowProcessFunMount getWorkflowProcessFunMount() {
		return workflowProcessFunMount;
	}
	public void setWorkflowProcessFunMount(
			WorkflowProcessFunMount workflowProcessFunMount) {
		this.workflowProcessFunMount = workflowProcessFunMount;
	}
	
	@ManyToOne(fetch = FetchType.LAZY, optional = true)
	@JoinColumn(name = "workflowTaskFunMount")
	public WorkflowTaskFunMount getWorkflowTaskFunMount() {
		return workflowTaskFunMount;
	}
	public void setWorkflowTaskFunMount(WorkflowTaskFunMount workflowTaskFunMount) {
		this.workflowTaskFunMount = workflowTaskFunMount;
	}
	public String getProcessDefinitionId() {
		return processDefinitionId;
	}
	public void setProcessDefinitionId(String processDefinitionId) {
		this.processDefinitionId = processDefinitionId;
	}
	public String getEventType() {
		return eventType;
	}
	public void setEventType(String eventType) {
		this.eventType = eventType;
	}
	public int getOrderIndex() {
		return orderIndex;
	}
	public void setOrderIndex(int orderIndex) {
		this.orderIndex = orderIndex;
	}
	
}
